package com.shujia.spring.mvc.controller;

import com.shujia.spring.mvc.service.UserService;
import com.shujia.spring.mvc.service.UserServiceImpl;
import com.shujia.spring.mvc.util.JDBCUtil;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

@RestController
@RequestMapping("/user")
public class UserController {
    static UserService userService = new UserServiceImpl();

    @GetMapping("/login")
    public String login(String username,String password){
        String msg = userService.login(username, password);
        return msg;
    }
}
